- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
43 lines (33 loc) · 795 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<iostream>
#include<vector>
voidreadInput(void);
intmain(void)
{
readInput();
return0;
}
voidreadInput()
{
int route = 0,
numberInput = 0;
std::cin >> route;
std::vector< std::vector<int> > mDistance;
for (int i = 0; i < route; i++)
{
std::vector<int> vTemp;
for (int j = 0; j < route; j++)
{
std::cin >> numberInput;
vTemp.push_back ( numberInput );
}
mDistance.push_back( vTemp );
}
std::cout << "\n\t *************** \n" << std::endl;
// Print out the elements
for(unsignedint i = 0; i< mDistance.size(); i++)
{
for (unsignedint j = 0; j < mDistance[i].size(); j++)
std::cout << "\t" << mDistance[i][j] << "";
std::cout << std::endl;
}
}